import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
     {
      path: '/',
      name: 'Login',
      component: () => import('../views/LoginView.vue'),
    },
     {
      path: '/Main',
      name: 'Main',
      component: () => import('../views/MainView.vue'),
      children:[
         {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
     {
      path: '/ShowPermission',
      name: 'ShowPermission',
      component: () => import('../views/Permission/ShowPermissionView.vue'),
    },
    {
      path: '/ShowRolePermission',
      name: 'ShowRolePermission',
      component: () => import('../views/Permission/ShowRolePermissionView.vue'),
    },
      {
      path: '/ShowUserRole',
      name: 'ShowUserRole',
      component: () => import('../views/Permission/ShowUserRoleView.vue'),
    },


      //轮播图管理
      {
      path: '/ShowCarouselChart',
      name: 'ShowCarouselChart',
      component: () => import('../views/ContentManagement/ShowCarouselChartView.vue'),
    },
    //医院管理
      {
      path: '/ShowHospitals',
      name: 'ShowHospitals',
      component: () => import('../views/ContentManagement/ShowHospitalsView.vue'),
    },
    //医院详情
      {
      path: '/HospitalDetail/:id',
      name: 'HospitalDetail',
      component: () => import('../views/ContentManagement/HospitalDetailView.vue'),
    },
    //科室管理
     {
      path: '/ShowDepartments',
      name: 'ShowDepartments',
      component: () => import('../views/ContentManagement/ShowDepartmentsView.vue'),
    },
      ]
    },
  ],
})

export default router
